<?php

namespace app\common\library;

use app\common\exception\FailedException;

class CustomResult
{
    public static function checkResult($result)
    {
        if ($result['code'] != Code::SUCCESS) {
            throw new FailedException($result['msg'], $result['code']);
        }
    }
}